home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / risc_ab_cm#1_tut.txt < prev    next >
Encoding:
Text File  |  1999-06-12  |  5.8 KB  |  167 lines

  1. ACiD BuRN's first VB crackme.. half a tutorial 
  2.  
  3. Tutorial by : R!SC -- risc@notme.com -- http://csir.cjb.net 
  4. Date : 12th june 1999
  5.  
  6.  
  7. hi.. my second VB crackme cracked.. i wanted to learn, and i did!!
  8.  
  9. i knew only __vbastrcomp, now i know a bit more :O
  10.  
  11. right, after wading through several vb tutorials, and getting nowhere
  12. (well, one mentioned __vbar4str / __vbar4var, which helped me a lot..
  13.  so i did get somewhere with them..)
  14.  
  15. well, i decided to WDasm msvbm50.dll, and get every exported funtion
  16. there was, to help me along.. :)
  17.  
  18. __vbar4str is something to do with real numbers, floating point ones..
  19.  
  20.  
  21. enter your name, first name, and company..
  22.  
  23. name: notme
  24. first: risc
  25. company: evc
  26.  
  27.  
  28. then enter a fake serial, i tried numbers only.. 1111 2222 3333
  29.  
  30. okay, so i bpx on __vbar4str, __vbar4var, __vbar8str, __vbar8var
  31.  
  32. and softice breaks and breaks and breaks. (on the __vbar8str...)
  33. i have no idea wtf is going on, so i try tracing through the call, and
  34. keep on displaying the registers, 'dl eax' 'dl ecx' '? eax' etc, while
  35. tracing, and hey! i keep seeing my numbers, but they also keep changing.
  36.  
  37. my numbers, and some other numbers.. :(  hmm, study the code.. makes no
  38. sense to me, but i see er.. lots of floating point asm, so i toggle the
  39. FP window 'wf', something that i never used before.. :) gee, i love 
  40. learning
  41.  
  42. upon having the fp registers displayed, i saw lots of other numbers, and
  43. whilst tracing through the code, after it breaks on __vbar8str, i noticed
  44. another function i could break on, __vbaI4Str..
  45.  
  46. clear all breakpoints, and set one on __vbaI4Str.. this one was groovy..
  47.  
  48. every time it breaks, st0=one of my numbers, either '1111' '2222' or '3333'
  49. i hit F11 to exit to the caller, then traced with F10, watching the FP 
  50. registers.. :)
  51.  
  52. suddenly, my number from st0 would move to st1, and another number
  53. appeared in st0 (ready for some action ?)
  54.  
  55.  
  56. 015F:7B3ED5F5  DB0424              FILD    DWORD PTR [ESP]  <-- this made the new number
  57. 015F:7B3ED5F8  58                  POP     EAX
  58. 015F:7B3ED5F9  33C0                XOR     EAX,EAX
  59. 015F:7B3ED5FB  8A06                MOV     AL,[ESI]
  60. 015F:7B3ED5FD  46                  INC     ESI
  61. 015F:7B3ED5FE  FF248594ED3E7B      JMP     [EAX*4+7B3EED94] <-- this call's the routine below
  62.  
  63. 015F:7B3EEAE2  E837010000          CALL    7B3EEC1E <-- tracing into this, we find a compare
  64. 015F:7B3EEAE7  EB0B                JMP     7B3EEAF4
  65.  
  66.  
  67. 015F:7B3EEC1E  D9C9                FXCH    ST(1)    <-- swaps st0 & st1, 
  68. 015F:7B3EEC20  DED9                FCOMPP           <-- compares them 
  69. 015F:7B3EEC22  DFE0                FSTSW   AX       <-- sets a bit in ax if equal?
  70. 015F:7B3EEC24  A80D                TEST    AL,0D
  71. 015F:7B3EEC26  0F857AB50000        JNZ     7B3FA1A6
  72. 015F:7B3EEC2C  A80D                TEST    AL,0D
  73. 015F:7B3EEC2E  0F8572B50000        JNZ     7B3FA1A6
  74. 015F:7B3EEC34  9E                  SAHF
  75. 015F:7B3EEC35  C3                  RET
  76.  
  77.  
  78. okay, when st0=1111, the other number that appeared was 97680
  79. when st0=2222, the other number that appeared was 177156
  80. when st0=3333, the other number that appeared was 22422
  81.  
  82.  
  83. so i thought, maybe, just maybe, my serial: 97680 177156 22422
  84.  
  85.  
  86. bc*, tried these numbers as the serial, BOOM!, the register button
  87. works, hehheh, job done..
  88.  
  89.  
  90. my second VB crackme cracked.. quite easy, just needed the right bpx..
  91.  
  92.  
  93. R!SC -- risc@notme.com
  94.  
  95. name: notme
  96. first: risc
  97. company: evc
  98. serial: 97680 177156 22422
  99.  
  100. name: a
  101. first: b
  102. company: c
  103. serial: 86136 152292 21978
  104.  
  105. :) starting to like VB.. (not!) 
  106.  
  107. p.s. on patching the nag, fuckit, its a crackme, not a application, and
  108. if i register it, the nag shouldnt be displayed anyway... i doubt you can
  109. patch the NAG, as its VB, and the 'exe isnt compiled with real instructions
  110. inside of it.. just VB info..  if anyone wants to try..... just notme..
  111.  
  112. p.p.s.. extra info, short & sweet.. (yah, i spoke to ACiD BURN, he said 
  113. my code is wrong, mentioned something about the date, used in the serial algo..
  114. so i reversed it some more, and made a keygen, to keep him happy :O)
  115.  
  116. enter fake code, 1111-2222-3333, 'wf' 'bpx __vbar8str' 'x', watch the numbers,
  117. F5 / F11, keep watching the numbers, try tracing with F10, you will find a
  118. multiply, for the day_of_the_month, and a divide, for the month..
  119. the first number to appear is your fake code, then the ascii value from the
  120. first letter of text, then the ??? number, then the day_of_month number...
  121.  
  122.  
  123. 015F:7B3EDFCB  DEC9                FMULP   ST(1),ST     <-- the multiply routine
  124. 015F:7B3EDFCD  33C0                XOR     EAX,EAX
  125. 015F:7B3EDFCF  8A06                MOV     AL,[ESI]
  126. 015F:7B3EDFD1  46                  INC     ESI
  127. 015F:7B3EDFD2  FF248594ED3E7B      JMP     [EAX*4+7B3EED94]
  128.  
  129.  
  130. 015F:7B3EE001  59                  POP     ECX
  131. 015F:7B3EE002  58                  POP     EAX
  132. 015F:7B3EE003  99                  CDQ
  133. 015F:7B3EE004  F7F9                IDIV    ECX          <-- the division routine
  134. 015F:7B3EE006  50                  PUSH    EAX
  135. 015F:7B3EE007  33C0                XOR     EAX,EAX
  136. 015F:7B3EE009  8A06                MOV     AL,[ESI]
  137. 015F:7B3EE00B  46                  INC     ESI
  138. 015F:7B3EE00C  FF248594ED3E7B      JMP     [EAX*4+7B3EED94]
  139.  
  140.  
  141. see the third number that appears, '444' or '777' or '111'? 
  142. get text length, decrease it by 1, divide it by 5, multiply answer with 111,
  143. add it to either '444' for first text, '777' for third text or '111' for
  144. second text...
  145.  
  146. i.e.
  147.  
  148.     mov     [mnum1],444
  149.     dec     eax         <-- eax== text length (of name..)
  150.     mov     ecx, 05
  151.     cdq
  152.     idiv    ecx
  153.     mov     ecx, 111
  154.     imul    ecx
  155.     add     [mnum1], eax
  156.     
  157.     
  158. code is calculated like so... 
  159. code#1= ascii#1 * xxx#1 * day_of_month / month 
  160. code#2= ascii#2 * xxx#3 * day_of_month / month 
  161. code#3= ascii#3 * xxx#2 * day_of_month / month 
  162.  
  163. or something.. heh..
  164.  
  165. R!SC -- risc@notme.com
  166.  
  167.